﻿using Corina.Datamodel.Base;
using Corina.Datamodel.Interface;
using Corina.Enumerations;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Serialization;

namespace Corina.Datamodel.Entities
{
    [XmlTypeAttribute(Namespace = "http://tempuri.org/")]
    public class WeburlCategoryInfo : DatamodelEntity, IWeburlCategory
    {
        #region Fields
        private int _id;
        private string _title;
        private int _topurlId = 0;
        private int _index = 0;
        #endregion

        #region Properties
        public int Id
        {
            get { return _id; }
            set
            {
                _id = value;
                RaisePropertyChanged(() => Id);
            }
        }
        public string Title
        {
            get { return _title; }
            set
            {
                _title = value;
                RaisePropertyChanged(() => Title);
            }
        }
        public int TopurlId
        {
            get { return _topurlId; }
            set
            {
                _topurlId = value;
                RaisePropertyChanged(() => TopurlId);
            }
        }
        public int Index
        {
            get { return _index; }
            set
            {
                _index = value;
                RaisePropertyChanged(() => Index);
            }
        }
        #endregion

        protected override IEnumerable<DatabaseColumn> InitColumns()
        {
            yield return new DatabaseColumn("Id", true);
            yield return new DatabaseColumn("Title");
            yield return new DatabaseColumn("TopurlId");
            yield return new DatabaseColumn("Index");
        }
    }
}